﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WLMes.Models
{
    /// <summary>
    /// 需求单
    /// </summary>
    public class MEASUREMENT_request
    {
        /// <summary>
        /// 请求编号
        /// </summary>
        public string RequestCode { get; set; }
        /// <summary>
        /// 产线编号
        /// </summary>
        public string LineCode { get; set; }
        /// <summary>
        /// 工序编号
        /// </summary>
        public string OperationCode { get; set; }
        /// <summary>
        /// 工序短名称
        /// </summary>
        public string OperationShortName { get; set; }
        /// <summary>
        /// 事件码
        /// </summary>
        public ushort EventCode { get; set; }
        /// <summary>
        /// 设备ID
        /// </summary>
        public string EquipmentID { get; set; }
        /// <summary>
        /// 生产批次号
        /// </summary>
        public string ProductionBatchCode { get; set; }
        /// <summary>
        /// 产品条码号
        /// </summary>
        public string PartSerialNumber { get; set; }
        /// <summary>
        /// 请求（操作）时间
        /// </summary>
        public string RequestTime { get; set; }


        /// <summary>
        /// 测量值集合
        /// </summary>
        public List<MeasurementSets> MeasurementSets { get; set; } = new List<MeasurementSets>();

    }


    /// <summary>
    /// 测量值集合
    /// </summary>
    public class MeasurementSets
    {
        /// <summary>
        /// 序号
        /// </summary>
        public int SequenceNumber { get; set; }

        /// <summary>
        /// 测量值ID
        /// </summary>
        public string MeasurementID { get; set; }
        /// <summary>
        /// 测量值名称
        /// </summary>
        public string MeasurementName { get; set; }

        /// <summary>
        /// 数据记录类型
        /// </summary>
        public int RecordType { get; set; }


        /// <summary>
        /// 下限值
        /// </summary>
        public double LowerLimit { get; set; }


        /// <summary>
        /// 上限值
        /// </summary>
        public double UpperLimit { get; set; }


        /// <summary>
        /// 目标值
        /// </summary>
        public double TargetValue { get; set; }

        /// <summary>
        /// 测量值对应的实际测量结果值
        /// </summary>
        public string MeasurementValue { get; set; }

        public string MeasurementUnit { get; set; }
        /// <summary>
        /// 文件路径
        /// </summary>
        public string FilePath { get; set; }


        /// <summary>
        /// 文件名
        /// </summary>
        public string FileName { get; set; }

    }
    /// <summary>
    /// 返回信息
    /// </summary>
    public class MEASUREMENT_response
    {
        /// <summary>
        /// 时间码
        /// </summary>
        public ushort EventCode { get; set; }

        /// <summary>
        /// 描述信息
        /// </summary>
        public string EventDescription { get; set; }
    }
}
